package com.esun.common.exception;

import com.esun.common.enums.Message;

/**
 * 自定义Http异常类
 *
 * @author john.xiao
 * @date 2020/9/1 11:02
 */
public class CustomException extends RuntimeException {

	private String msg;

	private String code = Message.QUERY_ERROR.getCode();

	public CustomException() {
	}

	public CustomException(String msg) {
		super(msg);
		this.msg = msg;
	}

	public CustomException(String msg, Throwable e) {
		super(msg);
		this.msg = msg;
	}

	public CustomException(String msg, String code) {
		super(msg);
		this.msg = msg;
		this.code = code;
	}

	public CustomException(String msg, String code, Throwable e) {
		super(msg);
		this.msg = msg;
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
}
